public class 一个数是否存在 {
    public static void main(String[] args) {
        int[] arr = {1, 5, 16, 21, 88, 37, 54};
        boolean flag = contains(arr, 88);
        System.out.println(flag);

    }

    public static boolean contains(int[] arr, int number) {
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == number) {
                return true;
            }
        }
        return false;
    }
}
